<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html,
        body {
            height: 100%;
            overflow: hidden;
            padding: 0;
            margin: 0;
        }
        /* 圣杯布局 */
        
        .container {
            height: 100%;
            padding: 0 200px;
        }
        
        .center {
            width: 100%;
            min-height: 400px;
            background-color: lightblue;
        }
        
        .left,
        .right {
            width: 200px;
            min-height: 200px;
            background-color: lightcoral;
        }
        
        .left,
        .right,
        .center {
            float: left;
        }
        
        .left {
            /* 定位 */
            /* position: absolute;
            left: 0; */
            /* 视频 */
            margin-left: -100%;
            position: relative;
            left: -200px;
        }
        
        .right {
            /* 定位 */
            /* position: absolute;
            right: 0; */
            margin-right: -200px;
        }
        /* 双飞翼 一不是一个容器 */
        /* .container,
        .left,
        .right {
            float: left;
        }
        
        .container {
            width: 100%;
        }
        
        .container .center {
            margin: 0 200px;
            min-height: 400px;
            background-color: lightcoral;
        }
        
        .left,
        .right {
            width: 200px;
            min-height: 200px;
            background-color: lightskyblue;
        }
        
        .left {
            margin-left: -100%;
        }
        
        .right {
            margin-left: -200px;
            /* margin-right: 100px; */
        /* }  */
    </style>
</head>

<body>
    <!-- 圣杯布局 一个容器中间 左边右边/// 使用calc -->
    <div class="container clearfix">
        <div class="center"></div>
        <div class="right"></div>
        <div class="left"></div>
    </div>
    <!-- 双飞翼布局  不是一个容器-->
    <!-- <div class="clearfix">
        <div class="container">
            <div class="center"></div>
        </div>
        <div class="left"></div>
        <div class="right"></div>
    </div> -->

</body>
<script>
    var x = 2;
    var i = 0;
    var y = {
        x: 3,
        z: (function(x) {
            ++i;
            console.log(i + "次" + this.x, x);
            // console.log(this.x, x); //2 2
            this.x *= x;
            console.log(i + "次" + this.x, x);
            // console.log(this.x, x); //4 2
            x += 2;
            return function(n) {

                console.log(i + "次" + this.x, n, x); //4,4,4  3 5 7
                this.x *= n;
                console.log(i + "次" + this.x, n, x); //16 4,4  15,5,7
                // console.log(this.x);
                x += 3; //4+3=7   7+3=10
                console.log(x);
            }
        })(x), //2\

    };
    var m = y.z;
    m(4);
    y.z(5)
    console.log(x, y.x);
</script>

</html>